package com.example.Blog.dao;

import com.example.Blog.model.ArticleType;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

public interface ArticleTypeDao extends JpaRepository<ArticleType, Integer> {
    ArticleType findByTypeId(int Id);
    ArticleType findByTypeName(String typeName);

    @Modifying
    @Transactional
    void deleteByTypeName(String typeName);
}
